import java.util.Scanner;

//1、使用二维数组存储班上五个学生三门功课的考试成绩，要求输出每一个学生的总分、平均分、最高分、最低分

public class Demo1 {
	public static void main(String[] args) {
		Scanner input = new Scanner(System.in);
		int[][] scores = new int[5][3];
		int max = 0;
		int min = 0;
		int sum = 0;
		int avg = 0;
		for (int i = 0; i < scores.length; i++) {
			max = min = scores[i][0];
			sum = 0;
			System.out.println("输入第" + (i + 1) + "个学生");
			for (int j = 0; j < scores[i].length; j++) {
				System.out.println("输入第" + (j + 1) + "门功课：");
				scores[i][j] = input.nextInt();
				if (max == 0 || min == 0) {
					max = min = scores[i][j];
				}
				if (max < scores[i][j]) {
					max = scores[i][j];
				}
				if (min > scores[i][j]) {
					min = scores[i][j];
				}
				sum += scores[i][j];
			}
			avg = sum / scores[i].length;
			System.out.println("总分：" + sum);
			System.out.println("平均分：" + avg);
			System.out.println("最高分：" + max);
			System.out.println("最低分：" + min);
			System.out.println("*******************************");
		}

	}
}
